﻿<%@ Page Title="Dịch vụ giảm giá" Language="C#" MasterPageFile="~/Luuli.master" AutoEventWireup="true" CodeFile="Dich_vu_giam_gia.aspx.cs" Inherits="Dich_vu_giam_gia" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
<%--<script type="text/javascript" src="java/jquery_vnz.js"></script>
<script type="text/javascript" src="java/chay.js"></script>--%>

<div class="thanhngang"><div class="giua"><table id="table" cellspacing="0">
			<tr>
				<td class="td_table">Giải trí</td>
				<td>Ẩm thực</td>
				<td>Văn hóa</td>
				<td>Xây dựng</td>
				<td>Giải trí</td>
				<td>Ẩm thực</td>
				<td>Văn hóa</td>
				<td>Xây dựng</td>
				<td>Giải trí</td>
				<td>Ẩm thực</td>
				<td>Văn hóa</td>
				<td>Xây dựng</td>
				<td>Giải trí</td>
				<td>Ẩm thực</td>
							
				
			</tr>
		</table></div></div>
<div class="giua">
<div class="main">

    <div class="left">
    		<div class="slide">
			<!-- Bắt đầu slide-->
			<div id="">
    <div id="">
        
<input name="hidIsHome" id="hidIsHome" value="1" type="hidden">  
<div id="box-center">
    <div id="center">
        
              
        <script>

            var is_home = window.document.getElementById('hidIsHome').value;
            function LoadConfig(id) {
                var configOffset = jQuery('#adv_config').offset();
                jQuery('html, body').animate({ scrollTop: configOffset.top });

                window.document.getElementById('title').value = window.document.getElementById('hidTitle_' + id).value;
                window.document.getElementById('advStartDate').value = window.document.getElementById('hidAdvStartDate_' + id).value;
                window.document.getElementById('advEndDate').value = window.document.getElementById('hidAdvEndDate_' + id).value;
                window.document.getElementById('link').value = window.document.getElementById('hidLink_' + id).value;

                if (window.document.getElementById('hidIsHome_' + id).value == 1) {
                    window.document.getElementById('is_home').checked = true;
                }
                else {
                    window.document.getElementById('is_home').checked = false;
                }

                if (window.document.getElementById('hidBlank_' + id).value == 1) {
                    window.document.getElementById('blank').checked = true;
                }
                else {
                    window.document.getElementById('blank').checked = false;
                }

                var zones = window.document.getElementById('zones');
                var selectedZones = window.document.getElementById('hidZones_' + id).value;
                if (selectedZones.length) {
                    selectedZones = ',' + selectedZones + ',';
                }
                for (i = 0; i < zones.options.length; i++) {
                    var option = zones.options[i];
                    if (selectedZones.indexOf(',' + option.value + ',') > -1) {
                        option.selected = true;
                    }
                    else {
                        option.selected = false;
                    }
                }


                window.document.getElementById('cmd').value = 'edit';
                window.document.getElementById('id').value = id;
                window.document.getElementById('bannerImg').innerHTML = '<img src="' + window.document.getElementById('hidImg_' + id).value + '" height="100" />';
            }

            function CheckDelete(id) {
                if (confirm('Are you sure?')) {
                    window.document.getElementById('cmd').value = 'delete';
                    window.document.getElementById('id').value = id;
                    window.document.getElementById('banner').click();

                    return true;
                }
                return false;
            }
        
        </script>
                    <div id="box-adv">
					
					</div>
	                <div id="img-other">
            			<div id="slide-boder">
						
						
						</div>
        </div>
	                 
        <script>
            var item_promos = [{ "id": "50", "link": "http://links-1", "blank": "0", "title": "Tieu de 1", "img": "./anh/2.jpg", "img_server": "6", "zones": "3", "catids": "", "is_home": "1", "start_date": null, "end_date": null, "img_large": "./anh/2.jpg", "img_thumb": "./anh/2.jpg", "zone_arr": ["3"], "cat_arr": [""] }, { "id": "58", "link": "http://links-2", "blank": "0", "title": "tieu de 2", "img": "2.jpg", "img_server": "0", "zones": "1", "catids": "", "is_home": "1", "start_date": null, "end_date": null, "img_large": "anh/3.jpg", "img_thumb": "anh/3.jpg", "zone_arr": ["1"], "cat_arr": [""] }, { "id": "70", "link": "http://links-3", "blank": "0", "title": "tieu de 3", "img": "anh/2.jpg", "img_server": "5", "zones": "2", "catids": "", "is_home": "1", "start_date": "0", "end_date": "0", "img_large": "anh/2.jpg", "img_thumb": "anh/2.jpg", "zone_arr": ["2"], "cat_arr": [""] }, { "id": "42", "link": "http://links-4", "blank": "0", "title": "Tieu de 4", "img": "anh/3.jpg", "img_server": "6", "zones": "1", "catids": "", "is_home": "1", "start_date": null, "end_date": null, "img_large": "anh/3.jpg", "img_thumb": "anh/3.jpg", "zone_arr": ["1"], "cat_arr": [""] }, { "id": "68", "link": "http://links5", "blank": "0", "title": "Tieu de 5", "img": "anh/2.jpg", "img_server": "5", "zones": "", "catids": "", "is_home": "1", "start_date": null, "end_date": null, "img_large": "anh/2.jpg", "img_thumb": "anh/2.jpg", "zone_arr": [""], "cat_arr": [""]}];
            var cur_pos = 0;
            var focus_length = 5;
            var is_timer = 0;



            for (i in item_promos) {
                if (i == 0) {
                    jQuery("#box-adv").html('<a ' + (item_promos[i]['blank'] == 1 ? 'target="_blank"' : '') + ' href="' + item_promos[i]['link'] + '" title="' + item_promos[i]['title'] + '"><img src="' + item_promos[i]['img_large'] + '" class="img_border" width="660" height="240"/></a>');

                    if (is_home == 1) {
                        jQuery("#slide-boder").html('<div class="img-select">\
                                                                                                            <div class="arrow"><img src="anh/arrow-slide.gif" with="19" height="10"/></div>\
                                                                                                            <div class="img-selected"><img title="' + item_promos[i]['title'] + '" src="' + item_promos[i]['img_thumb'] + '" height="55"/></div>\
                                                                                              </div>');
                    }
                    else if (focus_length > 1) {
                        jQuery('#curImgNotify').text(cur_pos + 1 + ' / ' + focus_length);
                    }
                }
                else if (is_home == 1) {
                    jQuery("#slide-boder").append('<div class="img-default"><div class="none"><img onclick="promo_focus(' + i + ');" title="' + item_promos[i]['title'] + '" src="' + item_promos[i]['img_thumb'] + '" height="55"/></div></div>');
                }
                if ((is_home == 1) && (i == 4)) {
                    break;
                }
            }

            setOpacity();

            function setOpacity() {
                var obj = jQuery('div[class="none"] img');
                obj.each(function () {
                    jQuery(this).addClass('trans90');
                    jQuery(this).mouseout(function () {
                        jQuery(this).removeClass('hover');
                        jQuery(this).addClass('trans90');
                    });
                    jQuery(this).mouseover(function () {
                        jQuery(this).removeClass('trans90');
                        jQuery(this).addClass('hover');
                    });
                });
            }

            function promo_focus(fstt) {
                if (typeof (item_promos[fstt]) != 'undefined') {
                    cur_pos = fstt;
                    jQuery("#slide-boder").html('');
                    var slide_html = '';
                    for (i in item_promos) {
                        if (!isNaN(i)) {
                            if (i == fstt) {

                                jQuery("#box-adv").html('<a ' + (item_promos[i]['blank'] == 1 ? 'target="_blank"' : '') + ' href="' + item_promos[i]['link'] + '" title="' + item_promos[i]['title'] + '"><img src="' + item_promos[i]['img_large'] + '" class="img_border" width="660" height="240"/></a>');

                                if (is_home == 1) {
                                    slide_html += ('<div class="img-select">\
                                                                                                                                    <div class="arrow"><img src="anh/arrow-slide.gif" with="19" height="10"/></div>\
                                                                                                                                    <div class="img-selected"><img title="' + item_promos[i]['title'] + '" src="' + item_promos[i]['img_thumb'] + '" height="55"/></div>\
                                                                                                                      </div>');
                                }
                                else if (focus_length > 1) {
                                    jQuery('#curImgNotify').text((cur_pos + 1) + ' / ' + focus_length);
                                }
                            }
                            else if (is_home) {

                                slide_html += ('<div class="img-default"><div class="none"><img onclick="promo_focus(' + i + ');" title="' + item_promos[i]['title'] + '" src="' + item_promos[i]['img_thumb'] + '" height="55"/></div></div>');
                            }

                            if ((is_home == 1) && (i == 4)) {
                                break;
                            }
                        }
                    }

                    if (is_home) {
                        jQuery("#slide-boder").html(slide_html);
                    }
                    setOpacity();
                }
            }

            function promo_focus_next(stop_timer) {
                if (focus_length > 1) {
                    jQuery("#pre_button").attr("className", "pre").mouseover(function () { jQuery(this).attr("className", "preOver") }).mouseout(function () { if (is_timer != -1) { jQuery(this).attr("className", "pre") } });
                    jQuery("#stop_button").attr("className", "stop").mouseover(function () { jQuery(this).attr("className", "stopOver") }).mouseout(function () { if (is_timer) { jQuery(this).attr("className", "stop") } });
                    jQuery("#next_button").attr("className", "nextOver").mouseover(function () { }).mouseout(function () { });
                }

                if (stop_timer) {
                    clearTimeout(pfocus_timer);
                }
                cur_pos++;
                if (cur_pos >= focus_length) {
                    cur_pos = 0;
                }

                is_timer = 1;
                promo_focus(cur_pos);
                pfocus_timer = setTimeout("promo_focus_next();", 5000);
            }

            function promo_focus_prev(stop_timer) {
                if (focus_length > 1) {
                    jQuery("#pre_button").attr("className", "preOver").mouseover(function () { }).mouseout(function () { });
                    jQuery("#stop_button").attr("className", "stop").mouseover(function () { jQuery(this).attr("className", "stopOver") }).mouseout(function () { if (is_timer) { jQuery(this).attr("className", "stop") } });
                    jQuery("#next_button").attr("className", "next").mouseover(function () { jQuery(this).attr("className", "nextOver") }).mouseout(function () { if (is_timer != 1) { jQuery(this).attr("className", "next") } });
                }

                if (stop_timer) {
                    clearTimeout(pfocus_timer);
                }

                cur_pos--;
                if (cur_pos < 0) {
                    cur_pos = focus_length - 1;
                }

                is_timer = -1;
                promo_focus(cur_pos);
                pfocus_timer = setTimeout("promo_focus_prev();", 5000);
            }

            function promo_focus_stop() {
                if (focus_length > 1) {
                    jQuery("#pre_button").attr("className", "pre").mouseover(function () { jQuery(this).attr("className", "preOver") }).mouseout(function () { if (is_timer != -1) { jQuery(this).attr("className", "pre") } });
                    jQuery("#stop_button").attr("className", "stopOver").mouseover(function () { }).mouseout(function () { });
                    jQuery("#next_button").attr("className", "next").mouseover(function () { jQuery(this).attr("className", "nextOver") }).mouseout(function () { if (is_timer != 1) { jQuery(this).attr("className", "next") } });
                }

                is_timer = 0;
                clearTimeout(pfocus_timer);
            }
            if (focus_length > 1) {
                jQuery("#next_button").attr("className", "nextOver");
            }
            jQuery(document).ready(function () {
                jQuery("#advStartDate").datepicker();
                jQuery("#advEndDate").datepicker();
                pfocus_timer = setTimeout("promo_focus_next();", 5000);
            });

            function openAdminAdv() {
                if (jQuery('#adv_config').is(':visible')) {
                    jQuery('#adv_config').hide();
                }
                else {
                    jQuery('#adv_config').show();
                }

            }
                    
        </script>
	              </div>
</div>
</div></div>
 </div>
			<!--Kết thúc slide -->
			
            
			
				
			<div class="head_sp_giam_gia"></div>
			<div class="content_sp_giam_gia"></div>		
			<div class="head_sp_giam_gia"></div>
			<div class="content_sp_giam_gia"></div>		
			<div class="head_sp_giam_gia"></div>
			<div class="content_sp_giam_gia"></div>		
			<div class="head_sp_giam_gia"></div>
			<div class="content_sp_giam_gia"></div>		
			
			<!--Phân trang-->
				
			<div class="phan-trang">
				<table align="center">
					 <tr>
					 	<td>&laquo;Trước</td>
						<td class="phan-trang_chon">1</td>
						<td>2</td>
						<td>3</td>
						<td>4</td>
						<td>5</td>
						<td>6</td>
						<td>7</td>
						<td>8</td>
						<td>9</td>
						<td>10</td>
						<td>...</td>
						<td>Sau &raquo;</td>
						
					 </tr>
				</table>
			</div>
	
				<!--Hết phân trang -->
				
    </div>
	
	<!-- menu bên phải-->
	<!-- Giảm giá-->
	<div class="slider">
      <div class="slider_giamgia">
        <div class="slider_mau" style="background:#ff4800; color:#480000;">Giảm giá cực sốc	</div>
        <div class="slider_mau" style="background:#ff5c00; color:#5c0000;">Giảm giá đến 90%</div>
        <div class="slider_mau" style="background:#ff7000; color:#700000;">Giảm giá đến 70%</div>        
        <div class="slider_mau" style="background:#ff8400; color:#840000;">Giảm giá đến 50%</div>
        <div class="slider_mau" style="background:#ff9800; color:#980000;">Giảm giá đến 30%</div>
        <div class="slider_mau" style="background:#ffac00; color:#ac0000;">Giảm giá đến 20%</div>
        <div class="slider_mau" style="background:#ffc000; color:#c00000;">Giảm giá đến 10%</div>
       </div>
	   <!-- Truy cập-->
	 	<div class="truycap_top">
      		<div class="slider_left">Tổng lượt truy cập: </div>
      		<div class="slider_right"> 123,456,789</div>
     	</div>
      	<div class="border_do">
        	<div class="slider_left">Truy cập hiện tại<br />Truy cập ngày<br />Truy cập tuần<br /> Truy cập tháng</div>
        	<div class="slider_right">10<br />123<br />123,456<br />123,456,789</div>
     	</div>
		
		<!-- Menu con-->
    	
       <div class="head_menu_2">
        	<div class="slider_left_2">Comment </div>
      		<div class="slider_right_2"></div>
            <div class="form_comment">        
             <textarea cols="32" rows="4" name="comment"/> i love luuli</textarea><br />
			  <div class="thich_fb">Thích FB</div>
			<div class="post-comment"><img src="anh/post_comment.png" /></div>
            </div>	
     	</div>
         <div class="head_menu_2">
        	<div class="slider_left_2">Quảng cáo &pound;uuli </div>
      		<div class="slider_right_2">Liên hệ quảng cáo</div>
            <div class="content_menu">       
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>Quảng cáo</p>
              <p>&nbsp;</p>
            </div>	
     	</div>
    </div>
</div></div>

</asp:Content>

